package util.common.delegate;

import java.util.Objects;

/**
 * 接收3个参数的无返回值函数式接口
 * @author ：Sei
 * @param <T1>
 * @param <T2>
 * @param <T3>
 */
@FunctionalInterface
public interface Action3<T1, T2, T3> {

    void on(T1 t1, T2 t2, T3 t3);

    default Action3<T1, T2, T3> andThen(Action3<? super T1, ? super T2, ? super T3> after) {
        Objects.requireNonNull(after);
        return (T1 t1,T2 t2, T3 t3) -> { on(t1, t2, t3); after.on(t1, t2, t3); };
    }
}
